package fr.jade.reflex.api.factory;

import org.objectweb.fractal.api.factory.*;
import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.Type;

/**
 * This interface is used to notify the creation of a component between the meta
 * and the exec level (and vice versa).
 * 
 * @author nono
 * @contact noel.depalma@inrialpes.fr
 */

public interface GenericFactoryNotification extends GenericFactory{

    /**
     * Creates a component.
     * 
     * @param type
     *            an arbitrary component type.
     * @param controllerDesc
     *            a description of the controller part of the component to be
     *            created. This description is implementation specific. If it is
     *            <tt>null</tt> then a "default" controller part will be used.
     * @param contentDesc
     *            a description of the content part of the component to be
     *            created. This description is implementation specific. It may
     *            be <tt>null</tt> to create component with an empty initial
     *            content. It may also be, in Java, the fully qualified name of
     *            a Java class, to create primitive components.
     * @return the {@link Component} interface of the created component.
     * @throws InstantiationException
     *             if the component cannot be created.
     */

    Component newFcInstanceNotification(Type type, Object controllerDesc,
            Object contentDesc)
            throws org.objectweb.fractal.api.factory.InstantiationException;
}
